package pacman.util;

public class ScoreRecord implements Comparable<ScoreRecord> {
    private String name;
    private Integer points;

    public ScoreRecord(String name, Integer points) {
		this.name = name;
		this.points = points;
    }

    public int compareTo(ScoreRecord o) {
		ScoreRecord comp = o;
		if (comp.getPoints() == this.getPoints()) {
		    return 0;
		}
		if (comp.getPoints() < this.getPoints()) {
		    return -1;
		} else {
		    return 1;
		}	
    }

    public Integer getPoints() {
		return points;
    }
    public void setPoints(Integer points) {
		this.points = points;
    }

    public String getName() {
		return name;
    }
}
